-
Notifications
You must be signed in to change notification settings - Fork 608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test create gauge fees #2228
Merged
Merged
test create gauge fees #2228
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
czarcas7ic
commented
Jul 24, 2022
x/incentives/keeper/gauge_test.go
Outdated
Comment on lines
302
to
310
// TODO: This is unexpected behavior | ||
// We need validation to not charge fee if user doesn't have enough funds | ||
// { | ||
// name: "one user tries to create a gauge, has enough funds to pay for the create gauge fee but not enough to fill the gauge", | ||
// accountBalanceToFund: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(60000000))), | ||
// gaugeAddition: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(30000000))), | ||
// expectedEndBalance: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(60000000))), | ||
// expectErr: true, | ||
// }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unexpected behavior
We need validation to not charge fee if user doesn't have enough funds
p0mvn
approved these changes
Jul 24, 2022
czarcas7ic
added a commit
that referenced
this pull request
Jul 26, 2022
* feat(incentives)!: create gauge and add to gauge fee charge * initialize txfees keeper before incentives * finish TestChargeFee * refactor to charge fee in message server * more tests * clean up * test balances * test create gauge fees (#2228) * test create gauge fees * add mod account to test * test create gauge fees * add mod account to test * move to msg server * merge * add comments * account keeper comment * fix TestCreateGaugeFee * apply appparams.BaseCoinUnit * remove txfees keeper from incentives and revert order * clean up * remove unused keepers fromm incentives keeper * Update x/incentives/keeper/gauge.go * Update x/incentives/keeper/gauge.go * clean up * fixture names * chargeFeeIfSufficientFeeDenomBalance test name * changelog * comment * finished tests (#2230) * finished tests * use keeper instead of math * remove unused tests * clean up * sim only allow accounts with enough to pay fee * lint * move fee to types and reuse in simulation (#2234) Co-authored-by: Adam Tucker <[email protected]> Co-authored-by: Adam Tucker <[email protected]>
czarcas7ic
added a commit
that referenced
this pull request
Jul 26, 2022
* feat(incentives)!: create gauge and add to gauge fee charge * initialize txfees keeper before incentives * finish TestChargeFee * refactor to charge fee in message server * more tests * clean up * test balances * test create gauge fees (#2228) * test create gauge fees * add mod account to test * test create gauge fees * add mod account to test * move to msg server * merge * add comments * account keeper comment * fix TestCreateGaugeFee * apply appparams.BaseCoinUnit * remove txfees keeper from incentives and revert order * clean up * remove unused keepers fromm incentives keeper * Update x/incentives/keeper/gauge.go * Update x/incentives/keeper/gauge.go * clean up * fixture names * chargeFeeIfSufficientFeeDenomBalance test name * changelog * comment * finished tests (#2230) * finished tests * use keeper instead of math * remove unused tests * clean up * sim only allow accounts with enough to pay fee * lint * move fee to types and reuse in simulation (#2234) Co-authored-by: Adam Tucker <[email protected]> Co-authored-by: Adam Tucker <[email protected]>
czarcas7ic
added a commit
that referenced
this pull request
Jul 26, 2022
…2227) (#2237) * feat(incentives)!: create gauge and add to gauge fee charge (#2227) * feat(incentives)!: create gauge and add to gauge fee charge * initialize txfees keeper before incentives * finish TestChargeFee * refactor to charge fee in message server * more tests * clean up * test balances * test create gauge fees (#2228) * test create gauge fees * add mod account to test * test create gauge fees * add mod account to test * move to msg server * merge * add comments * account keeper comment * fix TestCreateGaugeFee * apply appparams.BaseCoinUnit * remove txfees keeper from incentives and revert order * clean up * remove unused keepers fromm incentives keeper * Update x/incentives/keeper/gauge.go * Update x/incentives/keeper/gauge.go * clean up * fixture names * chargeFeeIfSufficientFeeDenomBalance test name * changelog * comment * finished tests (#2230) * finished tests * use keeper instead of math * remove unused tests * clean up * sim only allow accounts with enough to pay fee * lint * move fee to types and reuse in simulation (#2234) Co-authored-by: Adam Tucker <[email protected]> Co-authored-by: Adam Tucker <[email protected]> * merge gauge fee changes * go mod updates Co-authored-by: Roman <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes: #XXX
What is the purpose of the change
Adds GaugeCreation fee check tests. Working tests in tandem with Roman.